<%--
  Created by IntelliJ IDEA.
  User: 21360
  Date: 2024/9/27
  Time: 17:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <style></style>

</head>
<body>

<p>
    <form action="user?action">
       <div class="layui-form-item">
           <div class="layui-inline">
               <a class="layui-btn layui-bg-blue"href="add.jsp">添加用户</a>
               <div class="layui-input-inline layui-input-wrap">
                   <input type="text" placeholder="请输入姓名" name="name"  class="layui-input ">
               </div>
               <div class="layui-input-inline layui-input-wrap">
                   <input type="text" placeholder="请输入密码" name="pass"  class="layui-input ">
               </div>
           </div>
           <button type="submit" class="layui-btn" lay-submit lay-filter="demo1">查询</button>
           <a class="layui-btn" href="user?action=findAll">查询所有</a>
       </div>
    </form>
</p>

<c:forEach items="${users}"var="user">
    <tr>
        <td>${user.id}</td>
        <td>${user.name}</td>
        <td>${user.pass}</td>
    </tr>
    <a href=user/action=toUpdat&id=${user.id}">编辑</a>
    <a href=user?action=delete?id=${user.id}">删除</a>
</c:forEach>
</body>
</html>
